CFLAGS = -Wall -O3
LFLAGS = -L/usr/local/cuda/lib64/ -lcudart

.PHONY: all
all: main.o saxpy_gpu.o
	mpic++ main.o saxpy_gpu.o $(LFLAGS) -o saxpy

.PHONY: clean
clean:
	rm -f *.o
	rm -f saxpy

main.o: main.cpp
	mpic++ -c $(CFLAGS) $< -I./inc/

saxpy_gpu.o: saxpy_gpu.cu
	nvcc -c -O2 -arch=sm_20 --compiler-options "-O2 -Wextra" $< -I./inc/

